require("RecorderList")

local list = RecorderList:new()

print(#list.data)

local item1 = RecorderItem:new()
item1.Order = 1
item1.Name = "aaa"

local item2 = RecorderItem:new()
item2.Order = 3
item2.Name = "ccc"

local item3 = RecorderItem:new()
item3.Order = 2
item3.Name = "bbb"

local item4 = RecorderItem:new()
item4.Order = 4
item4.Name = "ddd"

list:Add(item1)
list:Add(item2)
list:Add(item3)
list:Add(item4)


print("=========添加完成=========")
for k,v in pairs(list.data) do
	print(v.Order..":"..v.Name)
end

find = list:Get(4)
print("=========查询完成=========")
print(find.Name)

find.Name = "kdf"
print("=========修改完成=========")
for k,v in pairs(list.data) do
	print(v.Order..":"..v.Name)
end

list:ReOrder()
print("=========排序完成=========")
for k,v in pairs(list.data) do
	print(v.Order..":"..v.Name)
end

list:Remove(2)
print("=========删除完成=========")
for k,v in pairs(list.data) do
	print(v.Order..":"..v.Name)
end